USERNAME="z2327972001"
PASSWORD='z20030610'
REGISTRY="registry.cn-guangzhou.aliyuncs.com"
IMAGE_NAME="z2327972001/springboot-init-backend"
IMAGE_TAG="v1.0.0-241125A"
FULL_IMAGE_NAME="$REGISTRY/$IMAGE_NAME:$IMAGE_TAG"

# docker login --username=z2327972001 --password=z20030610 registry.cn-guangzhou.aliyuncs.com

yarn build && \
docker login --username=$USERNAME --password=$PASSWORD $REGISTRY && \
docker build -t $FULL_IMAGE_NAME . && \
docker push $FULL_IMAGE_NAME

echo "build backend success"